#ifndef DRV_UART3_H
#define DRV_UART3_H


#include "gd32f4xx_usart.h"
#include "lwrb.h"
#include "FreeRTOS.h"
#include "task.h"
#include "queue.h"
#define USART2_RX_BUFF_NUMBER 128
#define MB_MASTER_USART_TX_DMA_CHANNEL DMA_CH3
#define MB_MASTER_Q_NUM 32   

#define  MB_MASTER_USART_RX_RINGBUFF_SIZE   300
#define  MB_MASTER_USART_TX_RINGBUFF_SIZE   300

extern lwrb_t mb_master_usart_rx_ringbuff;
extern lwrb_t mb_master_usart_tx_dma_ringbuff;
extern size_t mb_master_usart_rx_total_len;

extern QueueHandle_t mb_master_queue;


extern void RS485_init(uint32_t baudrate);
extern void mb_master_usart_send_data(uint8_t *data,size_t len);
#endif





